package me.bincker.formwork.web.modules.system.repository

import me.bincker.formwork.web.core.repository.IBaseRepository
import me.bincker.formwork.web.modules.system.entity.Role
import org.springframework.data.jpa.repository.Query

interface IRoleRepository : IBaseRepository<Role> {
    @Query("select role from Role role left join role.permissions permission where :permission in permission")
    fun findAllByPermission(permission: String): MutableList<Role>
}